<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<body>
<div class="nav">
    <ul>
        <li>福利管理</li>
        <li>/</li>
        <li>修改福利</li>
    </ul>
</div>
<div>
<form id="update">
    <p>
        <textarea style="width: 500px; height: 250px;" id="benefitDesc"></textarea>
    </p>
    <p class="btn-box">
        <input type="button" value="提交" onclick="doUpdate()">
        <input type="reset" value="重置">
    </p>
</form>
</div>
<script type="text/javascript">
    $(function () {
        $.get("/web/benefit", {op: "input", benefitId: updateId}, function (data) {
            $("#benefitDesc").val(data.benefitDesc);
        });
    });

    function doUpdate() {
        var info = $("#benefitDesc").val();
        $.post("/web/benefit", {op: "benefitUpdate", benefitId: updateId, benefitDesc: info}, function (data) {
            $("#content").load("benefit/benefit-list.html");
            alert(data);
        });
    }
</script>
</body>
</html>